<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2015/8/19 0019
  Time: 下午 5:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>艺格琴行后台系统</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <%--<script type="text/javascript" src="/static/bui/js/config.js"></script>--%>
    <%--<link href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">--%>
    <link href="../static/bui/css/page.css" rel="stylesheet" type="text/css"/>
    <link href="../static/bui/css/bs3/dpl.css" rel="stylesheet" type="text/css"/>
    <link href="../static/bui/css/bs3/bui.css" rel="stylesheet" type="text/css"/>
    <link href="../static/bui/css/main.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div class="header">

    <div class="dl-title">
        <span class="lp-title-port"></span><span class="dl-title-text">艺格琴行资源管理系统</span>
    </div>

    <div class="dl-log">欢迎您，<span class="dl-log-user">${user.username}</span>
        <a id="logout" onclick="logout();" title="退出系统" class="dl-log-quit">[退出]</a>
        <a class="dl-log-quit" href="/jsp/user/updatePwd.jsp">[修改密码]</a>
    </div>
</div>
<div class="content">
    <div class="dl-main-nav">
        <ul id="J_Nav" class="nav-list ks-clear">
            <li class="nav-item dl-selected">
                <div class="nav-item-inner nav-home">义蓬店</div>
            </li>
        </ul>
    </div>
    <ul id="J_NavContent" class="dl-tab-conten">

    </ul>
</div>
<script type="text/javascript" src="../static/bui/js/jquery-1.8.1.min.js"></script>
<script type="text/javascript" src="../static/bui/js/bui.js"></script>
<script type="text/javascript">

    //获取主页权限菜单
    BUI.use('common/main', function () {
        var config = [{
            id: 'menu',
            menu: [
                <c:forEach items="${menu}" var="m">
                {
                    text: '${m.name}',
                    items: [
                        <c:forEach items="${m.children}" var="mc">
                        {
                            text: '${mc.name}',
                            href: '${mc.url}'
                        },
                        </c:forEach>
                    ]
                },
                </c:forEach>
            ]
        }];
        new PageUtil.MainPage({
            modulesConfig: config
        });
    });

    //注销session，退出登录
    function logout() {
        $.ajax({
            type: 'post',
            url: '/login/logout',
            success: function (msg) {
                console.log("session注销" + msg);
                window.location.href = "/jsp/login.jsp"
            }
        });
    }
</script>
</body>
</html>
